/**
 * @Author: ls-mac
 * @Date:   2018-10-11T10:23:03+08:00
 * @Last modified by:   ls-mac
 * @Last modified time: 2019-08-07 16:13:11
 */

// use localStorage to store the authority info, which might be sent from server in actual project.
export function getAuthority() {
  const resource = sessionStorage.getItem('login-resources');
  let resArray = [];
  if (resource) {
    resArray = resource.split(',');
  }
  return resArray;
}

export function setAuthority(authority) {
  return sessionStorage.setItem('login-resources', authority);
}
